<template>
  <div class="container">
    <h1>事件修饰符</h1>
    <!-- 语法格式： @事件名.修饰符="处理方法" -->

    <form action="">
      <input type="text" @keyup.enter="two" />
      <button @click.prevent="one">按钮</button>
    </form>

  </div>
</template>

<script>
export default {
  methods: {
    one() {
      console.log('阻止了网页跳转');
    },
    two() {
      console.log('按下回车键');
    },
  },
};
</script>


<style>
p {
  width: 50px;
  height: 50px;
  color: #a6a1d9;
  font-size: 30px;
  text-align: center;
  line-height: 50px;
  border: 5px solid pink;
  border-radius: 50%;
}
h1 {
  color: #fe7299;
}
img {
  width: 150px;
  height: 150px;
}
input {
  color: #a6a1d9;
}
</style>

